#include "webclass.h"
#include <QDebug>

WebClass::WebClass(QObject* parent) : QObject(parent) 
{
    m_jsonData["name"] = "John";
}

void WebClass::jsCallQt(const QJsonObject& jsonData)
{
    m_jsonData = jsonData;
    emit dataChanged(m_jsonData);

    qDebug() << "JS Called Qt: " << jsonData; // 打印接收到的数据
}